home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1997 / MacHack 1997.toast / Hacks / Hacks ’93 / Listen to your hack…beat / Read Me < prev   
Encoding:
Text File  |  1993-06-18  |  2.9 KB  |  111 lines  |  [TEXT/KAHL]

  1. Listen to your hack…beat
  2.  
  3. by Bernie Bernstein entirely at MacHack '93
  4. bernard@cs.colorado.edu
  5. June 16-17, 1993
  6.  
  7.  
  8. This software is freeware. Feel free to use it, modify the code, and
  9. take advantage of its functionality. I would like to hear about
  10. modifications because people are going to ask me if they have
  11. been done.
  12.  
  13. Enjoy
  14.  
  15.  
  16.  
  17. ---
  18. Thanks to Chris DiGiano, who co-authored a paper for this conference and gave
  19. me some sample midi code from which I wrote this hack suite.
  20.  
  21. Thanks also to all the SmartFriends™ who helped me get this stuff to work,
  22. including Tim, Johan, Steve, Steve, Cameron, Dean, and many others.
  23. ---
  24.  
  25.  
  26.  
  27. This hack requires the midi manager 2.0.1 or later.
  28.  
  29. They are not very midi savvy yet. You need to manually patch them into your
  30. midi equipment after they begin running.
  31.  
  32.  
  33. ••••• System Extension •••••
  34.  
  35. "Listen to your hack…beat" System Extension patches several system traps so
  36. that you can hear different sounds from different channels of your midi
  37. device depending on what the operation and parameters are.
  38.  
  39. Only a few atraps are patched now, but the source code is all there so 
  40. you can add more. Some day, I may make this a Control Panel so that
  41. you can choose which traps to patch and what types of sounds should
  42. be made.
  43.  
  44. After booting with this system extension, you will need to patch it
  45. to your midi box.
  46.  
  47. Currently, the synth channels are set up like this:
  48.  
  49. 1     GetNextEvent
  50. 2     FrameRect         makes pitch according to area of rect
  51. 3     IconUtils
  52. 4     TEKey             makes pitch according to key pressed
  53.  
  54.  
  55.  
  56.  
  57. ••••• dcmd •••••
  58.  
  59. Put this dcmd into your Debugger Prefs file in the system folder and you
  60. will then have access to your midi equipment through MacsBug or the
  61. debugger of your choice.
  62.  
  63. Unfortunately, dcmd's can note be built from Think C. So you must have
  64. MPW to modify this stuff.
  65.  
  66. The syntax is shown in 'help play'
  67.  
  68. Start the synth with 'play on'
  69.  
  70. and then patch it into your midi box.
  71.  
  72. commands are
  73.  
  74. play on                                    ;signs into midi manager
  75. play off                                ;signs out (doesnt seem to work)
  76. play note [channel [pitch [velocity]]]    ;plays a note to channel, pitch, and velocity
  77. play stop [channel [pitch]]                ;stops playing a note
  78. play setchan <channel> <voice>            ;sets up a channel to play the given voice
  79.  
  80. If you want a note to play any time an atrap is called, do something like:
  81.  
  82. atb blockmove ';play note d0&f d0&7f+10;g'
  83. to get a sound played on some channel with pitch varying according to the size of the 
  84. block being moved.
  85.  
  86. or for arbitrary break points:
  87.  
  88. br myfunc ';play note 3 3f;g'
  89.  
  90.  
  91. as many as you like
  92.  
  93.  
  94.  
  95.  
  96.  
  97. ••••• Midi Library •••••
  98.  
  99. To use the library with your app, compile it with SONICAPP defined.
  100. (in think C, in the Prefix, in MPW in the compile 'C ... -d SONICAPP'
  101. #define SONICAPP
  102.  
  103. Look at the Bullseye application as an example.
  104.  
  105. you still need to patch it in after the app runs. Perhaps someone feels
  106. like fixing that, and also figuring out how to sign off from the
  107. midi manager.
  108.  
  109. Let me know if you do it.
  110.  
  111.